package com.mgm.creativeapp.service;

import java.util.List;
import java.util.Map;

import com.mgm.page.DataGrid;
import com.mgm.pojo.CreativeOfApp;
import com.mgm.result.IMessage;

/**
 * 
 * @ClassName: CreativeOfAppService 
 * @Description: TODO(...) 
 * @author Andy Zhang
 * @date 2018年6月28日 下午8:52:25 
 *
 */
public interface CreativeOfAppService {

	// 增加素材
	IMessage addCreativeOfApp(CreativeOfApp creativeOfApp);
	
	int insertBatch(List<CreativeOfApp> list);

	// 删除素材
	IMessage deleteCreativeOfApp(CreativeOfApp creativeOfApp);

	// 批量删除素材
	IMessage deleteById(List<String> uids);
	
	// 根据offer id 批量删除
	void deleteByOfferIds(List<String> offerIds);
	
	// 根据CreativeOfApp 批量删除
	void deleteByCreativeOfApp(List<CreativeOfApp> list);

	// 修改素材
	IMessage updateCreativeOfApp(CreativeOfApp creativeOfApp);

	// 是否启用素材
	IMessage isEnabled(String uid, String offerid, Boolean enabled);
	
	// 根据ID获取素材
	CreativeOfApp selectById(String uid);

	// 查询开启的素材
	List<CreativeOfApp> findAllByEnabled();

	// 分页查询
	DataGrid findAll(String offerid, Integer pageNum, Integer pageSize);

}
